package com.huilang.demo1;

public abstract class MenuComponent {
    protected String name;
    protected Integer level;

    public void add(MenuComponent menuComponent) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    public void remove(MenuComponent menuComponent) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public MenuComponent getChild(Integer index) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String getName() {
        return name;
    }
    public abstract void  print();
}
